<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div>
			<p>我是段落标签</p>
		</div>
		
		<script type="text/javascript">
			var div = document.getElementsByTagName('div')[0];
			var p = div.getElementsByTagName('p')[0];
			var a = document.createElement('a');
			a.href = '';
			div.insertBefore(a, p);
			
			var h1 = document.createElement('h1');
			h1.innerHTML = '我是标题标签';
			div.insertBefore(h1, a);
		</script>
	</body>
</html>
